package forms

type GoodsForm struct {
	PriceMin   float32 `form:"pmin" binding:"" json:"priceMin"`
	PriceMax   float32 `form:"pmax" binding:"" json:"priceMax"`
	IsHot      int32   `form:"ih" binding:"" json:"isHot"`
	IsNew      int32   `form:"in" binding:"" json:"IsNew"`
	IsTab      int32   `form:"it" binding:"" json:"isTab"`
	CategoryId int32   `form:"c" binding:"" json:"categoryId"`
	Pages      int32   `form:"p" binding:"" json:"pages"`
	PerNums    int32   `form:"pnum" binding:"" json:"perNums"`
	KeyWords   string  `form:"q" binding:"" json:"keyWords"`
	BrandId    int32   `form:"b" binding:"" json:"brandId"`
}
type Goods2Form struct {
	Name        string   `form:"name" json:"name" binding:"required,min=2,max=100"`
	GoodsSn     string   `form:"goods_sn" json:"goods_sn" binding:"required,min=2,lt=20"`
	Stocks      int32    `form:"stocks" json:"stocks" binding:"required,min=1"`
	CategoryId  int32    `form:"category" json:"category" binding:"required"`
	MarketPrice float32  `form:"market_price" json:"market_price" binding:"required,min=0"`
	ShopPrice   float32  `form:"shop_price" json:"shop_price" binding:"required,min=0"`
	GoodsBrief  string   `form:"goods_brief" json:"goods_brief" binding:"required,min=3"`
	Images      []string `form:"images" json:"images" binding:"required,min=1"`
	DescImages  []string `form:"desc_images" json:"desc_images" binding:"required,min=1"`
	ShipFree    *bool    `form:"ship_free" json:"ship_free" binding:"required"`
	FrontImage  string   `form:"front_image" json:"front_image" binding:"required,url"`
	Brand       int32    `form:"brand" json:"brand" binding:"required"`
}
type GoodsStatusForm struct {
	IsHot  *bool `form:"hot" binding:"required" json:"hot"`
	IsNew  *bool `form:"new" binding:"required" json:"new"`
	OnSale *bool `form:"sale" binding:"required" json:"sale"`
}
